P.Mod.layout = function(dom,options){
	this.cols = $.UT.DomSelector($("div",dom));
	this.mainLoader = $(this.cols["main"]).Widget("ModuleLoader");
	this.leftLoader = $(this.cols["left"]).Widget("ModuleLoader");
	this.rightLoader = $(this.cols["right"]).Widget("ModuleLoader");
	this.rightTopLoader = $(this.cols["rightTop"]).Widget("ModuleLoader");
	this.rightMiddleLoader = $(this.cols["rightMiddle"]).Widget("ModuleLoader");
};
P.Mod.layout.prototype.setLayout = function(cols){
	switch(cols){
		case 1 :
			$(this.cols["main"]).show();
			$(this.cols["left"]).hide();
			this.leftLoader.changeModule();
			$(this.cols["right"]).hide();
			this.rightLoader.changeModule();
			$(this.cols["rightTop"]).hide();
			this.rightTopLoader.changeModule();
			$(this.cols["rightMiddle"]).hide();
			this.rightMiddleLoader.changeModule();
			break;
		case 2 :
			$(this.cols["main"]).hide();
			this.mainLoader.changeModule();
			$(this.cols["left"]).show();
			$(this.cols["right"]).show();
			$(this.cols["rightTop"]).hide();
			this.rightTopLoader.changeModule();
			$(this.cols["rightMiddle"]).hide();
			this.rightMiddleLoader.changeModule();
			break;
		case 3 :
			$(this.cols["main"]).hide();
			this.mainLoader.changeModule();
			$(this.cols["left"]).show();
			$(this.cols["right"]).hide();
			this.rightLoader.changeModule();
			$(this.cols["rightTop"]).show();
			$(this.cols["rightMiddle"]).show();
			break;
	}
};

$('#layout').Module();
